Skip to content

fix(routing): filter internal Azure routing models from GitHub Copilot#1596

Merged
SebConejo merged 2 commits intomainfrom
debug-github-provider
Apr 17, 2026
Merged

fix(routing): filter internal Azure routing models from GitHub Copilot#1596
SebConejo merged 2 commits intomainfrom
debug-github-provider

Conversation

@SebConejo
Copy link
Copy Markdown
Member

@SebConejo SebConejo commented Apr 17, 2026

Summary

  • The Copilot API (api.githubcopilot.com/models) returns internal Azure routing entries (accounts/msft/routers/*) that are infrastructure-level load balancing endpoints, not user-facing chat models
  • Added copilot entry to PROVIDER_NON_CHAT regex filter to exclude these at fetch time
  • Applied filterNonChatModels() at cache-read time in getModelsForAgent() so previously-cached routing entries are also filtered out

Test plan

  • Added unit test for filtering at fetch time (provider-model-fetcher.service.spec.ts)
  • Added unit test for filtering at cache-read time (model-discovery.service.spec.ts)
  • Connect GitHub Copilot as a provider and verify accounts/msft/routers/* models no longer appear in the model selection modal

Summary by cubic

Filters internal Azure routing models from GitHub Copilot so only real chat models appear. Filtering runs on fetch and on cache reads to remove accounts/msft/routers/* entries.

  • Bug Fixes
    • Added copilot to PROVIDER_NON_CHAT to exclude router IDs.
    • Applied filterNonChatModels() to cached results in getModelsForAgent().
    • Added unit tests for both fetch-time and cache-time filtering.

Written for commit e638138. Summary will update on new commits.

…t provider

The Copilot API returns internal `accounts/msft/routers/*` entries that
are Azure load-balancing infrastructure, not user-facing chat models.
Add a PROVIDER_NON_CHAT filter for copilot and apply filterNonChatModels
at cache-read time so previously-cached entries are also excluded.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.00%. Comparing base (028cbca) to head (e638138).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1596      +/-   ##
==========================================
+ Coverage   97.92%   98.00%   +0.08%     
==========================================
  Files         118      119       +1     
  Lines        8675     8936     +261     
  Branches     3265     3364      +99     
==========================================
+ Hits         8495     8758     +263     
+ Misses        178      176       -2     
  Partials        2        2              
Flag Coverage Δ
frontend 98.00% <ø> (+0.08%) ⬆️
shared 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

@SebConejo SebConejo merged commit 4dda346 into main Apr 17, 2026
15 checks passed
@SebConejo SebConejo deleted the debug-github-provider branch April 17, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant